package com.jiunuan.live.id.generate.provider.service.bo;

import lombok.Data;

import java.util.concurrent.ConcurrentLinkedQueue;
/**
 * @Author JiuNuan
 * @Date: Created in 16:07 2024/8/1
 * @Description: 无序id段对象
 */
@Data
public class LocalUnSeqIdBO {
    private int id;
    /**
     * 提前将无序的id存放在这条队列中
     */
    private ConcurrentLinkedQueue<Long> idQueue;
    /**
     * 当前id段的开始值
     */
    private Long currentStart;
    /**
     * 当前id段的结束值
     */
    private Long nextThreshold;
}
